.1 Range Minimum Query (rmq) 1.2 Lowest Common Ancestor (lca)

نویسندگان

  • Yuri Lin
  • Andrew Winslow
چکیده

We care not only about the value of the minimum element, but also about the index k of the minimum element between A[i] and A[j]; given the index, it is easy to look up the actual value of the minimum element, so it is a more interesting problem to find the index of the minimum element between A[i] and A[j]. The range minimum query problem is not a tree problem, but it closely related to a tree problem (least common ancestor).

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Lecture 9 — March 4 , 2010

Last lecture we defined the Least Common Ancestor (LCA) and Range Min Query (RMQ) problems. Recall that an LCA query asks for the deepest node in a given rooted tree which is an ancestor of each of two query nodes, while an RMQ query asks for the minimal value stored in some contiguous subarray of a given array. We showed last lecture that an LCA query is nothing more than an RMQ query on an Eu...

متن کامل

Lecture 15 — April 12 , 2012

In this lecture, we look at various data structures to solve problems about static trees: given a static tree, we perform some preprocessing to construct our data structure, then use the data structure to answer queries about the tree. The three problems we look at in this lecture are range minimum queries (RMQ), lowest common ancestors (LCA), and level ancestor (LA); we will support all these ...

متن کامل

How to answer a small batch of RMQs or LCA queries in practice

In the Range Minimum Query (RMQ) problem, we are given an array A of n numbers and we are asked to answer queries of the following type: for indices i and j between 0 and n− 1, query RMQ A (i, j) returns the index of a minimum element in the subarray A[i . . j]. Answering a small batch of RMQs is a core computational task in many realworld applications, in particular due to the connection with ...

متن کامل

Modifications of the Landau-Vishkin Algorithm Computing Longest Common Extensions via Suffix Arrays and Efficient RMQ computations

Approximate string matching is an important problem in Computer Science. The standard solution for this problem is an O(mn) running time and space dynamic programming algorithm for two strings of length m and n. Landau and Vishkin developed an algorithm which uses suffix trees for accelerating the computation along the dynamic programming table and reaching space and running time in O(nk), wher...

متن کامل

On Succinct Representations of Binary Trees

We observe that a standard transformation between ordinal trees (arbitrary rooted trees with ordered children) and binary trees leads to interesting succinct binary tree representations. There are four symmetric versions of these transformations. Via these transformations we get four succinct representations of n-node binary trees that use 2n + n/(log n) bits and support (among other operations...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2012